package com.cn;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.List;



import com.cn.utils.excel.ExcelUtil;


/**
 * @ClassName: Test
 * @Description: TODO
 * @author Administrator
 * @date 2017年6月29日
 */

public class Test {

	public static void main(String[] args) throws Exception {
		FileInputStream inputstream=new FileInputStream("C:\\Users\\Administrator\\Desktop\\work\\test.xls");
		ExcelUtil<TestModel> util=new ExcelUtil<TestModel>(TestModel.class);
		List<TestModel> list=util.importExcel("Sheet1", inputstream);

		System.out.println(list.size());
		for (int i = 0; i < list.size(); i++) {
			if(i%100==0){
				System.out.println(i);
			}
			String s="INSERT INTO SSP_ARCH_BIZSTATUS (BIZDATA_CD, DATA_FLAG, SQBILL_STATE, SQARCH_STATE, ADDBILL_SIDX, TOBACKBILL_SIDX, TOADDBILL_SIDX, HZSQ_CD, THSQ_CD, NUM_ATTCH, NUM_INVOICE, AMT_TOTAL, CREATE_UID, CREATE_LOGIN, CREATE_NAME, CREATE_DEPT_CD, CREATE_DEPT_NM, CREATE_DATE, LSMOD_UID, LSMOD_LOGIN, LSMOD_NAME, LSMOD_DEPT_CD, LSMOD_DEPT_NM, LSMOD_DATE, REVIEW_MEMO, IMS_IMAGE_COUNT, IMS_ATTCH_COUNT, IMS_IMAGE_COUNT2, IMS_ATTCH_COUNT2)"+ 
"VALUES"+ 
"('"+list.get(i).getCode()+"', '01', '34', '0', NULL, NULL, NULL, NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, SYSDATE, NULL, NULL, NULL, NULL, NULL, SYSDATE, NULL, '0', '0', NULL, NULL);";
//			String s="DELETE from SSP_ARCH_BIZDATA_INDEX WHERE bizdata_cd='"+list.get(i)+"';";
			System.out.println(s);
		}
	}
}
